﻿#nullable disable

using System.ComponentModel.DataAnnotations;

namespace Mortis.Server.Models;

public class ExternalLoginConfirmationViewModel
{
    [Required]
    [Display(Name = "Courrier électronique")]
    public string Email { get; set; }
}

public class ExternalLoginListViewModel
{
    public string ReturnUrl { get; set; }
}

public class SendCodeViewModel
{
    public string SelectedProvider { get; set; }
    public ICollection<System.Web.Mvc.SelectListItem> Providers { get; set; }
    public string ReturnUrl { get; set; }
    public bool RememberMe { get; set; }
}

public class VerifyCodeViewModel
{
    [Required]
    public string Provider { get; set; }

    [Required]
    [Display(Name = "Code")]
    public string Code { get; set; }
    public string ReturnUrl { get; set; }

    [Display(Name = "Mémoriser ce navigateur ?")]
    public bool RememberBrowser { get; set; }

    public bool RememberMe { get; set; }
}

public class ForgotViewModel
{
    [Required]
    [Display(Name = "Courrier électronique")]
    public string Email { get; set; }
}

public class LoginViewModel
{
    [Required]
    [Display(Name = "Courrier électronique")]
    [EmailAddress]
    public string Email { get; set; }

    [Required]
    [DataType(DataType.Password)]
    [Display(Name = "Mot de passe")]
    public string Password { get; set; }

    [Display(Name = "Mémoriser mes informations")]
    public bool RememberMe { get; set; }
}

public class RegisterViewModel
{
    [Required]
    [EmailAddress]
    [Display(Name = "Courrier électronique")]
    public string Email { get; set; }

    [Required]
    [StringLength(100, ErrorMessage = "{0} doit contenir au moins {2} caractères.", MinimumLength = 6)]
    [DataType(DataType.Password)]
    [Display(Name = "Mot de passe")]
    public string Password { get; set; }

    [DataType(DataType.Password)]
    [Display(Name = "Confirmer le mot de passe")]
    [Compare("Password", ErrorMessage = "Le nouveau mot de passe et le mot de passe de confirmation ne correspondent pas.")]
    public string ConfirmPassword { get; set; }
}

public class ResetPasswordViewModel
{
    [Required]
    [EmailAddress]
    [Display(Name = "Courrier électronique")]
    public string Email { get; set; }

    [Required]
    [StringLength(100, ErrorMessage = "{0} doit contenir au moins {2} caractères.", MinimumLength = 6)]
    [DataType(DataType.Password)]
    [Display(Name = "Mot de passe")]
    public string Password { get; set; }

    [DataType(DataType.Password)]
    [Display(Name = "Confirmer le mot de passe")]
    [Compare("Password", ErrorMessage = "Le nouveau mot de passe et le mot de passe de confirmation ne correspondent pas.")]
    public string ConfirmPassword { get; set; }

    public string Code { get; set; }
}

public class ForgotPasswordViewModel
{
    [Required]
    [EmailAddress]
    [Display(Name = "E-mail")]
    public string Email { get; set; }
}
